import Vue from 'vue'
import VueRouter from 'vue-router'
import Nav from "@/components/Nav";
import Home from "@/views/Home";
import Details from "@/views/Details"
import Cart from "@/views/Cart"
import Checkout from "@/views/Checkout"
Vue.use(VueRouter)

export default new VueRouter({
    routes:[
        {
            path:'/',
            components:{
                nav:Nav,
                default:Home
            }
        },
        {
            path:'/detail/:idx',
            components:{
                nav:Nav,
                default:Details
            }
        },
        {
            path:'/cart',
            components:{
                nav:Nav,
                default:Cart
            }
        },
        {
            path:'/checkout',
            components:{
                nav:Nav,
                default:Checkout
            }
        }
    ]
})